<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/inet_stub/base/Coord.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00322.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Coord.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> * file:        Coord.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * author:      Christian Frank</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * copyright:   (C) 2004 Telecommunication Networks Group (TKN) at</span>
<a name="l00007"></a>00007 <span class="comment"> *              Technische Universitaet Berlin, Germany.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> *              This program is free software; you can redistribute it</span>
<a name="l00010"></a>00010 <span class="comment"> *              and/or modify it under the terms of the GNU General Public</span>
<a name="l00011"></a>00011 <span class="comment"> *              License as published by the Free Software Foundation; either</span>
<a name="l00012"></a>00012 <span class="comment"> *              version 2 of the License, or (at your option) any later</span>
<a name="l00013"></a>00013 <span class="comment"> *              version.</span>
<a name="l00014"></a>00014 <span class="comment"> *              For further information see file COPYING</span>
<a name="l00015"></a>00015 <span class="comment"> *              in the top level directory</span>
<a name="l00016"></a>00016 <span class="comment"> ***************************************************************************</span>
<a name="l00017"></a>00017 <span class="comment"> * part of:     framework implementation developed by tkn</span>
<a name="l00018"></a>00018 <span class="comment"> **************************************************************************/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __INET_COORD_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __INET_COORD_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;INETDefs.h&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;FWMath.h&quot;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00037"></a><a class="code" href="a00065.html">00037</a> <span class="keyword">class </span>INET_API <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> : <span class="keyword">public</span> cObject
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00041"></a><a class="code" href="a00065.html#a2d291cbb8e58af4ce8c68e9c8671b5d6">00041</a>     <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#a2d291cbb8e58af4ce8c68e9c8671b5d6" title="Constant with all values set to 0.">ZERO</a>;
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">public</span>:
<a name="l00046"></a>00046     <span class="keywordtype">double</span> x;
<a name="l00047"></a>00047     <span class="keywordtype">double</span> y;
<a name="l00048"></a>00048     <span class="keywordtype">double</span> z;
<a name="l00051"></a>00051 <span class="keyword">private</span>:
<a name="l00052"></a>00052   <span class="keywordtype">void</span> copy(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; other) { x = other.x; y = other.y; z = other.z; }
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="keyword">public</span>:
<a name="l00056"></a><a class="code" href="a00065.html#add896c4f3fb15b4ad762b5270855345c">00056</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>()
<a name="l00057"></a>00057         : x(0.0), y(0.0), z(0.0) {}
<a name="l00058"></a>00058 
<a name="l00060"></a><a class="code" href="a00065.html#a93d47461a77c401891842045ff712f15">00060</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z = 0.0)
<a name="l00061"></a>00061         : x(x), y(y), z(z) {}
<a name="l00062"></a>00062 
<a name="l00064"></a><a class="code" href="a00065.html#aaa9f1d0acf5250162e417b61eb12a006">00064</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; other)
<a name="l00065"></a>00065         : cObject(other) { copy(other); }
<a name="l00066"></a>00066 
<a name="l00068"></a><a class="code" href="a00065.html#a86994bfa7096155d951abb03dcf30bf1">00068</a>     std::string <a class="code" href="a00065.html#a86994bfa7096155d951abb03dcf30bf1" title="Returns a string with the value of the coordinate.">info</a>()<span class="keyword"> const </span>{
<a name="l00069"></a>00069         std::stringstream os;
<a name="l00070"></a>00070         os &lt;&lt; <span class="keyword">this</span>;
<a name="l00071"></a>00071         <span class="keywordflow">return</span> os.str();
<a name="l00072"></a>00072     }
<a name="l00073"></a>00073 
<a name="l00075"></a><a class="code" href="a00065.html#a4eb976e0a2def05ecb6464bd170b5fa9">00075</a>     <span class="keyword">friend</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#a4eb976e0a2def05ecb6464bd170b5fa9" title="Adds two coordinate vectors.">operator+</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; b) {
<a name="l00076"></a>00076         <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> tmp(a);
<a name="l00077"></a>00077         tmp += b;
<a name="l00078"></a>00078         <span class="keywordflow">return</span> tmp;
<a name="l00079"></a>00079     }
<a name="l00080"></a>00080 
<a name="l00082"></a><a class="code" href="a00065.html#a0a956e1210813652ce2caa7529b3e0be">00082</a>     <span class="keyword">friend</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#a0a956e1210813652ce2caa7529b3e0be" title="Subtracts two coordinate vectors.">operator-</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; b) {
<a name="l00083"></a>00083         <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> tmp(a);
<a name="l00084"></a>00084         tmp -= b;
<a name="l00085"></a>00085         <span class="keywordflow">return</span> tmp;
<a name="l00086"></a>00086     }
<a name="l00087"></a>00087 
<a name="l00089"></a><a class="code" href="a00065.html#a432afd497adcff7b20ca23af611ec919">00089</a>     <span class="keyword">friend</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#a432afd497adcff7b20ca23af611ec919" title="Multiplies a coordinate vector by a real number.">operator*</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a, <span class="keywordtype">double</span> f) {
<a name="l00090"></a>00090         <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> tmp(a);
<a name="l00091"></a>00091         tmp *= f;
<a name="l00092"></a>00092         <span class="keywordflow">return</span> tmp;
<a name="l00093"></a>00093     }
<a name="l00094"></a>00094 
<a name="l00096"></a><a class="code" href="a00065.html#a310db4e85a0b20ec14725f49aae08cc3">00096</a>     <span class="keyword">friend</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#a310db4e85a0b20ec14725f49aae08cc3" title="Divides a coordinate vector by a real number.">operator/</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a, <span class="keywordtype">double</span> f) {
<a name="l00097"></a>00097         <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> tmp(a);
<a name="l00098"></a>00098         tmp /= f;
<a name="l00099"></a>00099         <span class="keywordflow">return</span> tmp;
<a name="l00100"></a>00100     }
<a name="l00101"></a>00101 
<a name="l00105"></a><a class="code" href="a00065.html#a41a7f41a153a3fdbed9dea051f0ae559">00105</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; <a class="code" href="a00065.html#a41a7f41a153a3fdbed9dea051f0ae559" title="Multiplies this coordinate vector by a real number.">operator*=</a>(<span class="keywordtype">double</span> f) {
<a name="l00106"></a>00106         x *= f;
<a name="l00107"></a>00107         y *= f;
<a name="l00108"></a>00108         z *= f;
<a name="l00109"></a>00109         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00110"></a>00110     }
<a name="l00111"></a>00111 
<a name="l00115"></a><a class="code" href="a00065.html#a378973a28985ee7cb441eaf2e70ed378">00115</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; <a class="code" href="a00065.html#a378973a28985ee7cb441eaf2e70ed378" title="Divides this coordinate vector by a real number.">operator/=</a>(<span class="keywordtype">double</span> f) {
<a name="l00116"></a>00116         x /= f;
<a name="l00117"></a>00117         y /= f;
<a name="l00118"></a>00118         z /= f;
<a name="l00119"></a>00119         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00120"></a>00120     }
<a name="l00121"></a>00121 
<a name="l00125"></a><a class="code" href="a00065.html#a07c952bb96124ea08eeff7bba3de6072">00125</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; <a class="code" href="a00065.html#a07c952bb96124ea08eeff7bba3de6072" title="Adds coordinate vector &#39;a&#39; to this.">operator+=</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a) {
<a name="l00126"></a>00126         x += a.x;
<a name="l00127"></a>00127         y += a.y;
<a name="l00128"></a>00128         z += a.z;
<a name="l00129"></a>00129         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00130"></a>00130     }
<a name="l00131"></a>00131 
<a name="l00137"></a><a class="code" href="a00065.html#adda0e91b0e155a08a50e733dbfdb8837">00137</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; <a class="code" href="a00065.html#adda0e91b0e155a08a50e733dbfdb8837" title="Assigns coordinate vector &#39;other&#39; to this.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; other) {
<a name="l00138"></a>00138         <span class="keywordflow">if</span> (<span class="keyword">this</span> == &amp;other) <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00139"></a>00139         cObject::operator=(other);
<a name="l00140"></a>00140         copy(other);
<a name="l00141"></a>00141         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00142"></a>00142     }
<a name="l00143"></a>00143 
<a name="l00147"></a><a class="code" href="a00065.html#a2cafece343439d415c4557167556ba69">00147</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; <a class="code" href="a00065.html#a2cafece343439d415c4557167556ba69" title="Subtracts coordinate vector &#39;a&#39; from this.">operator-=</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a) {
<a name="l00148"></a>00148         x -= a.x;
<a name="l00149"></a>00149         y -= a.y;
<a name="l00150"></a>00150         z -= a.z;
<a name="l00151"></a>00151         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00152"></a>00152     }
<a name="l00153"></a>00153 
<a name="l00160"></a><a class="code" href="a00065.html#a2dc488cbfa8e8256dfc22b4916b9ef9b">00160</a>     <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="a00065.html#a2dc488cbfa8e8256dfc22b4916b9ef9b" title="Tests whether two coordinate vectors are equal.">operator==</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; b) {
<a name="l00161"></a>00161         <span class="comment">// FIXME: this implementation is not transitive</span>
<a name="l00162"></a>00162         <span class="keywordflow">return</span> <a class="code" href="a00095.html#a38d2500887b49de2a2b5f8610f7ba6d1">FWMath::close</a>(a.x, b.x) &amp;&amp; <a class="code" href="a00095.html#a38d2500887b49de2a2b5f8610f7ba6d1">FWMath::close</a>(a.y, b.y) &amp;&amp; <a class="code" href="a00095.html#a38d2500887b49de2a2b5f8610f7ba6d1">FWMath::close</a>(a.z, b.z);
<a name="l00163"></a>00163     }
<a name="l00164"></a>00164 
<a name="l00170"></a><a class="code" href="a00065.html#a321e8d56735047b9e49f869fd8f23d3e">00170</a>     <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="a00065.html#a321e8d56735047b9e49f869fd8f23d3e" title="Tests whether two coordinate vectors are not equal.">operator!=</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; b) {
<a name="l00171"></a>00171         <span class="keywordflow">return</span> !(a==b);
<a name="l00172"></a>00172     }
<a name="l00173"></a>00173 
<a name="l00177"></a><a class="code" href="a00065.html#ab6a7bfcc5c55e5d8edbc7c0cb5a11626">00177</a>     <span class="keywordtype">double</span> <a class="code" href="a00065.html#ab6a7bfcc5c55e5d8edbc7c0cb5a11626" title="Returns the distance to Coord &#39;a&#39;.">distance</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a)<span class="keyword"> const </span>{
<a name="l00178"></a>00178         <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> dist(*<span class="keyword">this</span> - a);
<a name="l00179"></a>00179         <span class="keywordflow">return</span> dist.<a class="code" href="a00065.html#acc536671c07e1af44e6ad9676a6c39ad" title="Returns the length of this Coords position vector.">length</a>();
<a name="l00180"></a>00180     }
<a name="l00181"></a>00181 
<a name="l00185"></a><a class="code" href="a00065.html#a9245e5acb794d95128e191e6faef99d4">00185</a>     <span class="keywordtype">double</span> <a class="code" href="a00065.html#a9245e5acb794d95128e191e6faef99d4" title="Returns distance^2 to Coord &#39;a&#39; (omits calling square root).">sqrdist</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a)<span class="keyword"> const </span>{
<a name="l00186"></a>00186         <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> dist(*<span class="keyword">this</span> - a);
<a name="l00187"></a>00187         <span class="keywordflow">return</span> dist.<a class="code" href="a00065.html#a278c018d6de54a020c39b3b1afaec50e" title="Returns the square of the length of this Coords position vector.">squareLength</a>();
<a name="l00188"></a>00188     }
<a name="l00189"></a>00189 
<a name="l00193"></a>00193     <span class="keywordtype">double</span> sqrTorusDist(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; b, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; size) <span class="keyword">const</span>;
<a name="l00194"></a>00194 
<a name="l00198"></a><a class="code" href="a00065.html#a278c018d6de54a020c39b3b1afaec50e">00198</a>     <span class="keywordtype">double</span> squareLength()<span class="keyword"> const</span>
<a name="l00199"></a>00199 <span class="keyword">    </span>{
<a name="l00200"></a>00200         <span class="keywordflow">return</span> x * x + y * y + z * z;
<a name="l00201"></a>00201     }
<a name="l00202"></a>00202 
<a name="l00206"></a><a class="code" href="a00065.html#acc536671c07e1af44e6ad9676a6c39ad">00206</a>     <span class="keywordtype">double</span> length()<span class="keyword"> const</span>
<a name="l00207"></a>00207 <span class="keyword">    </span>{
<a name="l00208"></a>00208         <span class="keywordflow">return</span> sqrt(squareLength());
<a name="l00209"></a>00209     }
<a name="l00210"></a>00210 
<a name="l00217"></a><a class="code" href="a00065.html#a7a42e29d7a15ed0b53e47137549e00a6">00217</a>     <span class="keywordtype">bool</span> <a class="code" href="a00065.html#a7a42e29d7a15ed0b53e47137549e00a6" title="Checks if this coordinate is inside a specified rectangle.">isInBoundary</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; lowerBound, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; upperBound)<span class="keyword"> const </span>{
<a name="l00218"></a>00218         <span class="keywordflow">return</span>  lowerBound.x &lt;= x &amp;&amp; x &lt;= upperBound.x &amp;&amp;
<a name="l00219"></a>00219                 lowerBound.y &lt;= y &amp;&amp; y &lt;= upperBound.y &amp;&amp;
<a name="l00220"></a>00220                 lowerBound.z &lt;= z &amp;&amp; z &lt;= upperBound.z;
<a name="l00221"></a>00221     }
<a name="l00222"></a>00222 
<a name="l00226"></a><a class="code" href="a00065.html#a0b27150571dfb315bea3e650ea2956a0">00226</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#a0b27150571dfb315bea3e650ea2956a0" title="Returns the minimal coordinates.">min</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a) {
<a name="l00227"></a>00227         <span class="keywordflow">return</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>(this-&gt;x &lt; a.x ? this-&gt;x : a.x,
<a name="l00228"></a>00228                      this-&gt;y &lt; a.y ? this-&gt;y : a.y,
<a name="l00229"></a>00229                      this-&gt;z &lt; a.z ? this-&gt;z : a.z);
<a name="l00230"></a>00230     }
<a name="l00231"></a>00231 
<a name="l00235"></a><a class="code" href="a00065.html#ac5a32e0e7a527085f63b7b3476ae47a0">00235</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00065.html#ac5a32e0e7a527085f63b7b3476ae47a0" title="Returns the maximal coordinates.">max</a>(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; a) {
<a name="l00236"></a>00236         <span class="keywordflow">return</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>(this-&gt;x &gt; a.x ? this-&gt;x : a.x,
<a name="l00237"></a>00237                      this-&gt;y &gt; a.y ? this-&gt;y : a.y,
<a name="l00238"></a>00238                      this-&gt;z &gt; a.z ? this-&gt;z : a.z);
<a name="l00239"></a>00239     }
<a name="l00240"></a>00240 };
<a name="l00241"></a>00241 
<a name="l00242"></a>00242 
<a name="l00243"></a>00243 <span class="keyword">inline</span> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; coord)
<a name="l00244"></a>00244 {
<a name="l00245"></a>00245     <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; coord.x &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; coord.y &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; coord.z &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00246"></a>00246 }
<a name="l00247"></a>00247 
<a name="l00248"></a>00248 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Coord.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
